<?php
$items_cookie=array();
if(isset($_COOKIE['items'])) $items_cookie=explode(';',$_COOKIE['items']);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
    <link rel="stylesheet" type="text/css" href="./Theme/Css/01.css" media="all" />
    <link rel="stylesheet" type="text/css" href="./Theme/Css/flexslider.css" media="all" />
    <script src="./Theme/js/jquery-1.6.1.min.js" type="text/javascript"></script>    
    <script src="./Theme/js/modernizr-1.7.min.js" type="text/javascript"></script>
    <script src="./Theme/js/jquery.flexslider-min.js" type="text/javascript"></script>  
    <script src="./Theme/js/knockout-1.2.1.js" type="text/javascript"></script>      
    <!--script src="./Theme/js/snowfall.jquery.js" type="text/javascript"></script-->     
    <title>Thời trang nam nữ, giay nam, giay nu, phụ kiện thời trang hang doc</title>
        <meta name="description" content="Cung cấp c&#225;c sản phẩm giầy nam gi&#224;y nữ, quần &#225;o xuất khẩu, phụ kiện thời trang. C&#225;c sản phẩm phụ kiện kỹ thuật số cực độc. Tel: (08) 3979 7085" />
        <meta name="keywords" content="Giày xuất khẩu, Giày thời trang, Giày Ecko, Mắt kính thời trang, phụ kiện thời trang, đồ chơi, quà tặng, Giày nam, giày nữ, áo sơ mi, áo khoác" />
	<script type="text/javascript">
	//<![CDATA[
		var items='';
		function SetCookie(c_name, value, expiredays)
		{
			var exdate = new Date;
			exdate.setDate(exdate.getDate() + expiredays);
			document.cookie = c_name + "=" + escape(value) + (expiredays == null ? "" : ";expires=" + exdate.toGMTString());
		}
		function GetCookie(c_name)
		{
			if (document.cookie.length > 0)
			{
				c_start = document.cookie.indexOf(c_name + "=");
				if (c_start !=- 1)
				{
					c_start = c_start + c_name.length + 1;
					c_end = document.cookie.indexOf(";", c_start);
					if (c_end ==- 1) {
						c_end = document.cookie.length;
					}
					return unescape(document.cookie.substring(c_start, c_end));
				}
			}
			return '';
		}
	//]]>
	</script>
</head>
<body>
 <div id="classified-bar">
    <div class="container">
        <span>Dịch vụ khách hàng 14/7: (08) 3979 7085</span>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <span>Trực tuyến: </span>
        <span><a href="ymsgr:sendIM?yameshop" class="ymsgr">Chăm sóc khách hàng</a></span>
        <span>&nbsp;-&nbsp;</span>
        <span><a href="ymsgr:sendIM?yameshop_saler" class="ymsgr">Bộ phận bán hàng online</a></span>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
        <span><a href="/Help">Hướng dẫn mua hàng/đặt hàng online</a></span>
    </div>
</div>
<div id="container">
<div class="container">
   
    <div id="header" class="bgcolor1 header_background colors_background1 colors_background1_text">

	<h1 id="display_homepage_title" class="colors_homepage_title"><a href="#" title="YameShop - You Are My Everything">YaMe Shop</a></h1>
    <div class="search">
        <form action="javascript:;" method="post" id="topSearchForm" name="topSearchForm">
            <input type="text" class="searchinput" id="searchKeyword" name="searchKeyword" value=""/>
            <a class="submit" href="javascript:void(0);" id="topSearchCmd" name="topSearchCmd">Tìm kiếm</a>
        </form>
        <script type="text/javascript">
            $(function () {
                $('#topSearchCmd').click(function () {
                    $('#topSearchForm').submit();
                });
            });
        </script>
    </div>
	<div id="header_nav">
		<ul>
                <li><a href="/TaiKhoan/DangNhap">Đăng nhập</a></li>
                <li><a href="/TaiKhoan/DangKy">Đăng ký</a></li>
            <li class="last"><a href="/Help">Trợ giúp</a></li>
		</ul>
	</div>
	
	<div id="shopping_cart_summary">
		<div id="display_cart_summary"><div class="cartsummary_full">Giỏ hàng: <b><span id="spcart"><?php echo count($items_cookie)>0?count($items_cookie)-1:0; ?></span></b> - <a href="index.php?p=order">Thanh toán / Check out</a></div></div>
	</div>	
</div>
<div class="clearfix" id="navigation">
      <div id="layerOne">
        <ul id="root" style="visibility: visible;">
            <li class="navLink"><a class="mainNav" href="index.php" rel="yamehot"><span>YaMe</span></a></li>

			<?php
			foreach($cat0->sub as $sub)
			{
				echo '<li class="navLink"><a class="mainNav" href="index.php?p=cat&catid='.$sub['id'].'" rel="cat_' . $sub['id'] . '"><span>' . $sub['catname'] . '</span></a></li>';
			}
			?>
	
            <li class="navLink last"><a class="mainNav" href="#" rel="lienhe"><span>Liên hệ</span></a></li>	
        </ul>        
      </div> 

      <div class="subnav clearfix" id="subcontainer">


<ul id="yamehot">
    <li><a href="javascript:;">Chúng tôi khác biệt!</a></li>
    <li><a href="#">Tuyển dụng</a></li>
</ul>

<ul id="lienhe" style="display:none;">
    <li><a href="#">Liên hệ YaMe</a></li>
    <li><a href="#">Trung tâm YaMe</a></li>
    <li><a href="#">YaMe II</a></li>
    <li><a href="#">Yame III</a></li>
    <li><a href="#">Yame IV</a></li>
</ul>
	<?php
		foreach($cat0->sub as $sub)
		{
			$cat=new Category($sub['id']);
			echo '<ul id="cat_' . $cat->data['id'] . '" style="display:none;">';
			foreach($cat->sub as $sub1)
			{
				echo '<li><a href="index.php?p=cat&catid='.$sub1['id'].'">' . $sub1['catname'] . '</a></li>';
			}
			echo '</ul>';
		}
	?>
      </div>
    </div>
</div>
